package com.biz.primus.management.commodity.feign;

import com.biz.primus.commodity.vo.BrandQueryVo;
import com.biz.primus.commodity.vo.backend.BrandListItemVo;
import com.biz.primus.commodity.vo.backend.UpdateBrandVo;
import com.biz.primus.common.vo.SpringPageVO;
import com.biz.primus.management.commodity.degraded.DegradedBrandFeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 分类Feign Client
 *
 * @author david-liu
 */
@FeignClient(name = "service-commodity", fallback = DegradedBrandFeignClient.class)
public interface BrandFeignClient {

    @PostMapping("soa/brandService/findAll")
    SpringPageVO<BrandListItemVo>  findAll(@RequestBody BrandQueryVo reqVo);

    @GetMapping("soa/brandService/getBrandById")
    UpdateBrandVo getBrandById(@RequestParam("id") Long brandId);

    @PostMapping("soa/brandService/updateBrand")
    void update(UpdateBrandVo brandVo);
}
